package com.order.web;

import com.order.pojo.Order;
import com.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zx
 * @date 2021/11/12 21:34
 */
@RestController
@RequestMapping("/order")
@EnableFeignClients(basePackages = "com.fegin.clients")
public class OrderController {
    @Autowired
    OrderService orderService;

    @GetMapping("{id}")
    Order fandById(@PathVariable("id") Long id){
        return orderService.fandById(id);
    }

}
